import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, combineReducers } from 'redux'
import { Provider } from 'react-redux'
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import { syncHistoryWithStore, routerReducer } from 'react-router-redux'
import * as reducers from '../../../src/reducers'

const store = createStore(
  combineReducers({
    ...reducers,
    routing: routerReducer
  })
);
const history = syncHistoryWithStore(browserHistory, store);

import App from './components/App';
import Home from './components/Home';
import Domain from './components/Domain';

ReactDOM.render(
  <Provider store={store}>
    <div>
      <Router history={history}>
        <Route path="/" component={App}>
          <IndexRoute component={Home}/>
          <Route path="/domain" component={Domain}/>
        </Route>
      </Router>
    </div>
  </Provider>,
  document.getElementById('App')
);

import './static/css/style.less'